Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CassandraProjectionSpec race conditions #756

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

johanandren
Copy link
Member

@johanandren johanandren commented Dec 1, 2022

References #643

Ordering issue, the test expected that offsets writing was always completed when the next envelope is processed. Throwing in the event handler can overtake the write since it is run in a stream and errors tearing down the stream is not ordered.

A delay(100.millis) between the atLeastOnceHandlerFlow and the downstream ending in offset commit confirms the suspicion by failing the test cases exercising failure

  • Bonus: added stack traces to integration test failures.

Ordering issue, the test expected that offsets writing was always completed
when the next envelope is processed. Throwing in the event handler can overtake
the write since it is run in a stream and errors tearing down the stream is not ordered.

* Bonus: added stack traces to integration test failures.
@johanandren
Copy link
Member Author

Looks like the other projection tests (JdbcProjectionSpec, SlickProjectionSpec, R2dbcProjectionSpec over in r2dbc-plugin) could be making the same assumption about offset commit completing before next envelope is processed.

@johanandren
Copy link
Member Author

Looked into the JDBC test but touching that triggered other timing sensitive problems, so leaving that and Slick for now as its is this test consistently failing.

@johanandren
Copy link
Member Author

Looked into the R2DBC atLeastOnce test cases and I think those are alright because not inspecting offset until end of test cases which should work fine.

@johanandren johanandren changed the title fix: CassandraProjectionSpec making the wrong assumptions fix: CassandraProjectionSpec race conditions Dec 1, 2022
@johanandren johanandren merged commit 545b793 into main Jan 26, 2023
@johanandren johanandren deleted the wip-643-cassandra-projection-spec-fail branch January 26, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant